package com.cy.pj.common.pojo;

import lombok.Data;

import java.io.Serializable;

/**
 * 借助此对象封装控制层响应到客户端的数据
 */
@Data
public class JsonResult implements Serializable {
    private Integer state =1;
    private String messge = "ok";
    private Object data;

    public JsonResult(){}

    public JsonResult(String messge){
        this.messge=messge;
    }

    public JsonResult(Object date){
        this.data=data;
    }

    public JsonResult(Throwable e){
        this.state=0;
        this.messge=e.getMessage();
    }
}
